Movie Module Workflow
Understand how movie functionalities work.
We'll cover the following
Flow summary#
Movies are the items to be reviewed. Only an admin user can create the movies, and only a reviewer user can review them. It’s important to note that every movie must fall into a specific genre. This allows us to filter and manage movies by type while keeping everything organized.
Movie module#
The movie module has the same functionalities as the genre module, including create, read, read all, modify, and delete. Additionally, it has a search feature that uses input from users to look up movies in the database that might contain the search term or terms. It’s also worth noting that the genre and movie modules have a check statement for the create, edit, and delete functions. It looks to see what kind of user is attempting to perform that action. The user is permitted to proceed if they have the user type admin; otherwise, they’re not.
Endpoints#
Some of the movie module endpoints are listed below:
Create a movie: Adds a new movie
nameto the database for evaluation.Fetch a movie: Delivers information about a specific movie depending on the provided
movie_id.Fetch all movies: Retrieves every movie in the database movie collection.
Edit movie: Collects a
movie_id, searches for a movie with thatmovie_id, and the adjusts the necessary parameter.Find a movie: Asks the user for a search parameter and searches the database for movies with that parameter in their title.
Fetch movies in a genre: Takes a
genre_idand returns movies that belong to that genre.
Quiz on Genre Operations
Creating a Movie